Machin-like formula

In mathematics, Machin-like formulae are a class of identities involving π = 3.14159... that generalize John Machin's formula from 1706:

\frac{\pi}{4} = 4 \arctan\frac{1}{5} - \arctan\frac{1}{239},

which he used along with the Taylor series arctangent expansion to compute π to 100 decimal places.

Machin-like formulas have the form

\frac{\pi}{4} = \sum_{n}^N a_n \arctan\frac{1}{b_n}

with a_n and b_n integers.

The same method is still among the most efficient known for computing a large number of digits of π with digital computers.

Contents

Derivation

To understand where this formula comes from, start with following basic ideas:

In other words, for small numbers, arctangent is to a good approximation just the identity function. This leads to the possibility that a number q can be found such that

\frac{\pi}{16} = \arctan\left(\frac{1}{5}\right) - \frac{1}{4} \arctan(q).

Using elementary algebra, we can isolate q:

q = \tan\left(4 \arctan\left(\frac{1}{5}\right) - \frac{\pi}{4}\right)

Using the identities above, we substitute arctan(1) for π/4 and then expand the result.

q = \frac{\tan\left(4 \arctan\left(\frac{1}{5}\right)\right) - 1} { 1 %2B \tan\left(4 \arctan\left(\frac{1}{5}\right)\right)}

Similarly, two applications of the double angle identity yields

\tan\left(4 \arctan\left(\frac{1}{5}\right)\right) = \frac{120}{119}

and so

q = \frac{\frac{120}{119} - 1}{1 %2B\frac{120}{119}} = \frac{1}{239}.

Other formulas may be generated using complex numbers. For example the angle of a complex number a+bi is given by \arctan\frac{b}{a} and when you multiply complex numbers you add their angles. If a=b then \arctan\frac{b}{a} is 45 degrees or \frac{\pi}{4}. This means that if the real part and complex part are equal then the arctangent will equal \frac{\pi}{4}. Since the arctangent of one has a very slow convergence rate if we find two complex numbers that when multiplied will result in the same real and imaginary part we will have a Machin-like formula. An example is (2 %2B i) and (3 %2B i). If we multiply these out we will get (5 %2B 5i). Therefore \arctan\frac{1}{2} %2B \arctan\frac{1}{3} = \frac{\pi}{4}.

If you want to use complex numbers to show that \frac{\pi}{4} = 4\arctan\frac{1}{5} - \arctan\frac{1}{239} you first must know that when multiplying angles you put the complex number to the power of the number that you are multiplying by. So (5%2Bi)^4 (-239%2Bi) = -2^2(13^4)(1%2Bi) and since the real part and imaginary part are equal then, 4\arctan\frac{1}{5} - \arctan\frac{1}{239} = \frac{\pi}{4}

Two-term formulas

There are exactly three additional Machin-like formulas with two terms; these are Euler's

\frac{\pi}{4} = \arctan\frac{1}{2} %2B \arctan\frac{1}{3},

Hermann's,

\frac{\pi}{4} = 2 \arctan\frac{1}{2} - \arctan\frac{1}{7},

and Hutton's

\frac{\pi}{4} = 2 \arctan\frac{1}{3} %2B \arctan\frac{1}{7}.

More terms

The 2002 record for digits of π, 1,241,100,000,000, was obtained by Yasumasa Kanada of Tokyo University. A 64-node Hitachi supercomputer with 1 terabyte of main memory, performing 2 trillion operations per second, was used to evaluate the following Machin-like formulas:

 \frac{\pi}{4} = 12 \arctan\frac{1}{49} %2B 32 \arctan\frac{1}{57} - 5 \arctan\frac{1}{239} %2B 12 \arctan\frac{1}{110443}
Kikuo Takano (1982).
 \frac{\pi}{4} = 44 \arctan\frac{1}{57} %2B 7 \arctan\frac{1}{239} - 12 \arctan\frac{1}{682} %2B 24 \arctan\frac{1}{12943}
F. C. W. Störmer (1896).

The more efficient currently known Machin-like formulas for computing:


\begin{align}
\frac{\pi}{4} =& 183\arctan\frac{1}{239} %2B 32\arctan\frac{1}{1023} - 68\arctan\frac{1}{5832} %2B 12\arctan\frac{1}{110443}\\
& - 12\arctan\frac{1}{4841182} - 100\arctan\frac{1}{6826318}\\
\end{align}
黃見利(Hwang Chien-Lih) (1997).

\begin{align}
\frac{\pi}{4} =& 183\arctan\frac{1}{239} %2B 32\arctan\frac{1}{1023} - 68\arctan\frac{1}{5832} %2B 12\arctan\frac{1}{113021}\\
& - 100\arctan\frac{1}{6826318} - 12\arctan\frac{1}{33366019650} %2B 12\arctan\frac{1}{43599522992503626068}\\
\end{align}
黃見利(Hwang Chien-Lih) (2003).

These Machin-like formula is shown by the following identities;

 \arctan x %2B \arctan y = \arctan \frac{x %2B y}{1 - xy},
 \arctan x - \arctan y = \arctan \frac{x - y}{1 %2B xy},

or equivalently,

 \arctan \frac{a}{b} %2B \arctan \frac{c}{d} = \arctan \frac{ad %2B bc}{bd - ac},
 \arctan \frac{a}{b} - \arctan \frac{c}{d} = \arctan \frac{ad - bc}{bd %2B ac}.

These identities are easily derived from the definition of arctangent. With these identities, we shall show the Machin-like formula such as Takano;


\begin{align}
12 \arctan \frac{1}{49} &%2B 32 \arctan \frac{1}{57} - 5 \arctan \frac{1}{239} 
%2B 12 \arctan \frac{1}{110443} \\
&= 12 \arctan \frac{46}{2253} %2B 32 \arctan \frac{1}{57} - 5 \arctan \frac{1}{239} \\
&= 12 \arctan\frac{3}{79} %2B 20 \arctan\frac{1}{57} - 5 \arctan\frac{1}{239} \\
&= 12 \arctan\frac{1}{18} %2B 8 \arctan\frac{1}{57} - 5 \arctan\frac{1}{239}  \ \  \ \ \text{(Gauss)} \\
&= 4 \arctan\frac{1}{18} %2B 8 \arctan\frac{3}{41} - 5 \arctan\frac{1}{239}  \\
&= 4 \arctan\frac{17}{331} %2B 4 \arctan\frac{123}{836} - \arctan\frac{1}{239}  \\
&= 4 \arctan\frac{1}{5} - \arctan\frac{1}{239} \ \ \ \  \text{(Machin)} \\
&= 2 \arctan\frac{5}{12} - \arctan\frac{1}{239}   \\
&= \arctan\frac{120}{119} - \arctan\frac{1}{239}   \\
&= \arctan 1 = \frac{\pi}{4}.
\end{align}
:

External links